//
//  CurrencyExchangeGmoJaMa.m
//  DataCollector
//
//  Created by jiro on 12/07/07.
//  Copyright 2012 jiro music. All rights reserved.
//
//
//#import "CurrencyExchangeGmoMa.h"
//
//#import "../../DbConstants.h"
//#import "../../DbUtility.h"
//#import "libpq-fe.h"
//
//
//@implementation CurrencyExchangeGmoMa
//
//+ (CurrencyExchangeGmoMa*) currencyExchangeGmoMaWithValues: (NSArray*) values
//{
//	CurrencyExchangeGmoMa* ret	= [ [ CurrencyExchangeGmoMa alloc ] init ];
//	ret.code			= [ values objectAtIndex: 0 ];
//	ret.targetCurrencyCode = [ values objectAtIndex: 1 ];
//	ret.exchangeDate	= [ NSDate dateWithString: 
//		[ DbUtility convertIsoStdDateStringToCocoaDateString: [ values objectAtIndex: 2 ] ] ];
//	ret.openPrice		= [ [ values objectAtIndex: 3 ] floatValue ];
//	ret.closePrice		= [ [ values objectAtIndex: 4 ] floatValue ];
//	ret.highPrice		= [ [ values objectAtIndex: 5 ] floatValue ];
//	ret.lowPrice		= [ [ values objectAtIndex: 6 ] floatValue ];
//	ret.averageLength	= [ [ values objectAtIndex: 7 ] intValue ];
//	return ret;
//}
//
//+ (NSString*) tableName
//{
//	return kText_CurrencyExchangeGmoMaTable;
//}
//
//+ (NSString*) sourceTableName
//{
//	return kText_CurrencyExchangeGmoTable;
//}
//
//+ (NSString*) queryCreateTable
//{
//	NSString* s = [ NSString stringWithFormat:
//		@"create table %@ ( %@ %@, %@ %@, %@ %@, %@ %@, %@ %@, %@ %@, %@ %@, %@ %@, %@( %@, %@, %@, %@ ) );",
//			[ CurrencyExchangeGmoMa tableName ], 
//			kText_Code, kText_Text,
//			kText_TargetCurrencyCode, kText_Text,
//			kText_ExchangeDate, kText_TimestampWithTimeZone,
//			kText_OpenPrice, kText_Real,
//			kText_HighPrice, kText_Real,
//			kText_LowPrice, kText_Real, 
//			kText_ClosePrice, kText_Real,
//			kText_AverageLength, kText_Integer,
//			kText_PrimaryKey, kText_Code, kText_TargetCurrencyCode, kText_ExchangeDate, kText_AverageLength
//	];
//	return s;
//}
//
//+ (NSString*) querySelectAllWithClauses: (NSArray*) clauses
//{
//	NSString* s = [ DbTableEntry_ querySelectAllWithTableName: [ CurrencyExchangeGmoMa tableName ] andClauses: clauses ];
//	return s;
//}
//
//+ (NSString*) querySelectFields: (NSArray*) fieldNodes andClauses: (NSArray*) clauses
//{
//	NSString* s = [ DbTableEntry_ querySelectFields: fieldNodes tableName: [ CurrencyExchangeGmoMa tableName ] andClauses: clauses ];
//	return s;
//}
//
//+ (NSString*) querySelectAll
//{
//	NSString* s = [ NSString stringWithFormat: @"select * from %@;", [ CurrencyExchangeGmoMa tableName ] ];
//	return s;
//}
//
//
//- (NSString*) queryInsert
//{
//	NSString* s = [ NSString stringWithFormat: @"insert into %@ values %@", 
//		[ CurrencyExchangeGmoMa tableName ], [ self queryInsertValue ] ];
//	return s;
//}
//
//@end
